﻿using System;
using System.Windows;

namespace Lib.WPF {
    /// <summary>
    /// 入口程序
    /// </summary>
    public partial class App : Application {
        /// <summary>
        /// 
        /// </summary>
        protected override void OnStartup(StartupEventArgs e) {
            base.OnStartup(e);
            try {
                var LogOn = new Login();
                var Result = LogOn.ShowDialog();
                if (Result.HasValue && !Result.Value) {
                    Environment.Exit(0);
                }
            } catch (Exception ex) {
                MessageBox.Show($"错误详情：{ex.Message}");
            }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="e"></param>
        protected override void OnExit(ExitEventArgs e) {
            base.OnExit(e);
        }
    }

}
